<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表单进阶-字段集</title>
    <style>
        fieldset{
            border: 1px solid blue;
        }
        legend{
            color: red;
            text-align: center;
        }
    </style>
</head>
<body>
    <div>字段集</div>
    <fieldset>
        <legend>个人信息</legend>
        性别: <input type="radio" name="a" >男
        <input type="radio" name="a"> 女
    </fieldset>
    <fieldset>
        <legend>爱好</legend>
        <input type="checkbox" name="a" >男
        <input type="checkbox" name="a"> 女
    </fieldset>
</body>
</html>